package com.isoftstone.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.isoftstone.dao.EducateDAO;
import com.isoftstone.pojo.Educate;
import com.isoftstone.service.EducateService;

@Service
public class EducateSerivceImpl implements EducateService{

	@Autowired
	private EducateDAO educateDAO;
	
	@Override
	public int addEducate(Educate educate) {
		// TODO Auto-generated method stub
		return educateDAO.insert(educate);
	}

	@Override
	public int remove(int id) {
		// TODO Auto-generated method stub
		return educateDAO.delete(id);
	}

	@Override
	public int update(Educate educate) {
		// TODO Auto-generated method stub
		return educateDAO.update(educate);
	}


	@Override
	public Educate getEducateById(int id) {
		// TODO Auto-generated method stub
		return educateDAO.selectEducateById(id);
	}

	@Override
	public List<Educate> getAllEducate(boolean b) {
		// TODO Auto-generated method stub
		return educateDAO.selectAll(b);
	}
}
